package drp.snowbell.part;

import java.util.Date;

import drp.snowbell.annotation.APart;
import drp.snowbell.annotation.AProperty;


/**
 * 日期记录技能.
 * 
 * @author jimmy
 * 
 */
@APart(name = DateLogger.SKILL_NAME)
public class DateLogger extends PartBase {

	public final static String SKILL_NAME = "DateLogger";
	@AProperty
	private Date enteredDate;
	@AProperty
	private Date modifiedDate;

	/**
	 * 获取创建日期
	 * 
	 * @return
	 */
	public Date getEnteredDate() {
		// if (enteredDate == null) {
		// enteredDate = new Date();
		// }
		return enteredDate;
	}

	/**
	 * 设置创建日期
	 * 
	 * @param newValue
	 */
	public void setEnteredDate(Date newValue) {
		enteredDate = newValue;
	}

	/**
	 * 获取修改日期
	 * 
	 * @return
	 */
	public Date getModifiedDate() {
		return modifiedDate;
	}

	/**
	 * 设置修改日期
	 * 
	 * @param newValue
	 */
	public void setModifiedDate(Date newValue) {
		modifiedDate = newValue;
	}

	@Override
	public String getSkillName() {
		return SKILL_NAME;
	}
}
